﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mysql
{
	// Token: 0x0200014F RID: 335
	public class TMySQLCallStmt : TCustomMySQLStmt
	{
		// Token: 0x06000B36 RID: 2870 RVA: 0x00305AF7 File Offset: 0x00303CF7
		public TMySQLCallStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmysqlcall;
		}

		// Token: 0x06000B37 RID: 2871 RVA: 0x00305B0C File Offset: 0x00303D0C
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TStubStmtSqlNode tstubStmtSqlNode = (TStubStmtSqlNode)this.rootNode;
			this.procedureName = tstubStmtSqlNode.ObjectName;
			this.parameters = tstubStmtSqlNode.ExprList;
			return 0;
		}

		// Token: 0x1700020B RID: 523
		// (get) Token: 0x06000B38 RID: 2872 RVA: 0x00305B50 File Offset: 0x00303D50
		// (set) Token: 0x06000B39 RID: 2873 RVA: 0x00305B58 File Offset: 0x00303D58
		public virtual TExpressionList Parameters
		{
			get
			{
				return this.parameters;
			}
			set
			{
				this.parameters = value;
			}
		}

		// Token: 0x1700020C RID: 524
		// (get) Token: 0x06000B3A RID: 2874 RVA: 0x00305B61 File Offset: 0x00303D61
		// (set) Token: 0x06000B3B RID: 2875 RVA: 0x00305B69 File Offset: 0x00303D69
		public virtual TObjectName ProcedureName
		{
			get
			{
				return this.procedureName;
			}
			set
			{
				this.procedureName = value;
			}
		}

		// Token: 0x06000B3C RID: 2876 RVA: 0x00305B72 File Offset: 0x00303D72
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000B3D RID: 2877 RVA: 0x00305B82 File Offset: 0x00303D82
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.parameters != null)
			{
				this.parameters.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040012A8 RID: 4776
		private TObjectName procedureName;

		// Token: 0x040012A9 RID: 4777
		private TExpressionList parameters;
	}
}
